<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>文章 - 博客管理系统</title>
<link rel="stylesheet" type="text/css" href="/admin/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/admin/css/style.css">
<link rel="stylesheet" type="text/css" href="/admin/css/font-awesome.min.css">
<link rel="apple-touch-icon-precomposed" href="/admin/images/icon/icon.png">
<link rel="shortcut icon" href="/admin/images/icon/favicon.ico">
<script src="/admin/js/jquery-2.1.4.min.js"></script>
<script src = "/layer/layer.js"></script>
</head>
<body class="user-select" style="margin: 0px;padding: 0px;">
	<div>
      		<ul class="breadcrumb" style="margin: 0px;">
      			<li>留言管理</li>
      			<li>留言查询</li>
      		</ul>
      	</div>
      <form action="/back/message/list" method="post"  class="form-inline">
		<div class="row alert alert-info">
   				<div class="form-group">
   					<input type="text" name="messageName" value="${(message.messageName)!}" class="form-control" placeholder="请输入姓名"/>
   					<input type="submit" value="查询" class="btn btn-info "/>
   				
   				
   				</div>
   		</div>
        <div class="table-responsive">
          <table class="table table-striped table-hover">
            <thead>
              <tr>
                <th>编号</th>
                <th>姓名</th>
                <th>留言内容</th>
                <th>留言日期</th>
                <th>是否显示</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
            <#list (messageInfos)! as message>
            <tr>
                <td>${(message.messageId)!}</td>
                <td class="article-title">${(message.messageName)!}</td>
                <td>${(message.messageContent)!}</td>
                <td>${(message.messageTime)?string("yyyy-MM-dd HH:mm:ss")}</td>
                <td>${(message.messageMark=='1')?string('是','否')}</td>
                <td>
                    <a href="/back/message/update?messageMark=1&messageId=${(message.messageId)!}" style="color: green">显示</a>
                    <a href="/back/message/update?messageMark=-1&messageId=${(message.messageId)!}" style="color: red">不显示</a>


                    <a href="javascript:void(0)" onclick="deleteMessage(${(message.messageId)})" rel="6">删除</a></td>
            </tr>
            </#list>

            </tbody>
          </table>
        </div>
      </form>
<script src="/admin/js/bootstrap.min.js"></script> 
<script src="/admin/js/admin-scripts.js"></script>
<script type="text/javascript">

    function deleteMessage(messageId) {
        layer.confirm('是否删除该留言？',
            {
                btn:['是','否'],//按钮
                icon:2   //图标
            },
            function () {
                location.href = "/back/message/delete?messageId=" + messageId;
            }
        )

    }
</script>

</body>
</html>
